
#include "headers/Pagina.h"
#include "headers/Macros.h"

#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

void CriarPagina(const char* string, Pagina* posicao) {
	//Assert(posicao != NULL);
	char* stringCopy = (char*)malloc(strlen(string));
	strcpy(stringCopy, string);

	char* line = (char*)malloc(TAMANHO_CONTEUDO);

	const char* header;
	const char* search = ";";
	
	header = strtok(stringCopy, search);
	line = strtok(NULL, search);

	posicao->id = (int)strtol(header, NULL, 16);
	strcpy(posicao->conteudo, line);

	// ler o ID
	// ler o conte�do
	
	// atribuir esses valores para "posicao"
}
